const pageNum = 1
const pageSize = 20
// 发布帖子
export const sendTopic = (data) => wx.http.post('/chat/topic/sendTopic', data)
//获取帖子列表
export const getTopicList = (params) => wx.http.get('/chat/topic/topicList', params)
//获取帖子评论列表
export const getReplyList = (params) => wx.http.get('/chat/topic/getReplyList', params)
//获取帖子子评论列表
export const getReplyChildList = (params) => wx.http.get('/chat/topic/getReplyChildList', params)
//获取帖子点赞列表
export const topicLikeUserList = (params) => wx.http.get('/chat/topic/getTopicLikeUserList', params)
//获取关注帖子列表
export const collectList = (params) => wx.http.get('/chat/collect/topicFollowList', params)
//获取收藏帖子列表
export const TopicCollectUserList = (params) => wx.http.get('/chat/topic/getTopicCollectUserList', {
  pageNum,
  pageSize,
  topicId: params.topicId,
  userId: params.userId
})
//获取打赏用户列表
export const TopicRewardUserList = (params) => wx.http.get('/chat/topic/getTopicRewardUserList', {
  pageNum,
  pageSize,
  topicId: params.topicId,
  userId: params.userId
})
//获取帖子详情
export const getTopic = (params) => wx.http.get('/chat/topic/getTopic', params)
//回复帖子
export const addReply = (data) => wx.http.post('/chat/topic/addReply', data)
//删除回复
export const removeReply = (params) => wx.http.get(`/chat/topic/removeReply/${params.userId}/${params.replyId}`)
//帖子点赞
export const like = (params) => wx.http.get('/chat/topic/like', params)
//取消帖子点赞
export const cancelLike = (params) => wx.http.get('/chat/topic/cancelLike', params)
//帖子收藏
export const collect = (params) => wx.http.post('/chat/collect/addCollect', params)
//取消帖子收藏
export const cancelCollect = (params) => wx.http.get('/chat/collect/cancelCollect', params)
//获取帖子时间列表
export const getTopicEventList = (topicId) => wx.http.get('/chat/topicEvent/getTopicEventList/' + topicId)
//点赞评论
export const likeReply = (params) => wx.http.get('/chat/topic/likeReply', params)
//取消点赞评论
export const cancelLikeReply = (params) => wx.http.get('/chat/topic/cancelLikeReply', params)